/**
 * 
 */
package org.going.utils;

/**
 * @author ferendo.huang@gmail.com
 * 
 */
public class StringUtils
{
	public static boolean hasContent(Object obj)
	{
		return obj != null && (obj instanceof String ? hasContent((String) obj) : true);
	}

	public static boolean hasContent(String str)
	{
		return str != null && str.trim().length() > 0;
	}

	public static boolean empty(Object obj)
	{
		return obj == null || (obj instanceof String && empty((String) obj));
	}

	public static boolean empty(String str)
	{
		return str == null || str.trim().length() == 0;
	}
}
